#include <bits/stdc++.h>
using namespace std;

// #define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...)                             \
	{                                         \
		cerr << "\033[32;1m" << #x << " -> "; \
		err(x);                               \
	}
void err()
{
	cerr << "\033[39;0m" << endl;
}
template <typename T, typename... A>
void err(T a, A... x)
{
	cerr << a << ' ';
	err(x...);
}
#else
#define dbg(...)
#endif

typedef long long LL;

const int N = 1e6 + 50;

int prime[N], pcnt;
int minp[N];

void init()
{
	for (int i = 2; i < N; ++i)
	{
		if (!minp[i])
		{
			prime[pcnt++] = i;
			minp[i] = i;
		}
		for (int j = 0; j < pcnt; ++j)
		{
			LL nextp = 1LL * i * prime[j];
			if (nextp >= N)
				break;
			minp[nextp] = prime[j];
			if (i % prime[j] == 0)
				break;
		}
	}
	// for (int i = 0; i < 25; ++i)
	// 	dbg(i, prime[i]);
}

vector<LL> choices;

LL ans, x, ax, ay;

void dfs(int dep, LL a, LL b)
{
	if (max(a, b) >= ans)
		return;
	
	if (dep == choices.size())
	{
		ans = max(a, b);
		ax = a;
		ay = b;
		return;
	}
	dfs(dep+1, a*choices[dep], b);
	dfs(dep+1, a, b*choices[dep]);
}

int main(int argc, char const *argv[])
{
	init();
	cin >> x;
	if (x == 1)
	{
		puts("1 1");
		return 0;
	}
	LL y = x;
	
	for (int i = 0; i < pcnt && y >= prime[i]; ++i)
	{
		// dbg(y, prime[i]);
		if (y % prime[i] == 0)
		{
			// choices.push_back(1);
			LL nv = 1;
			while (y % prime[i] == 0)
			{
				nv *= prime[i];
				y /= prime[i];
			}
			choices.push_back(nv);
		}
	}
	if (y > 1) choices.push_back(y);
	for (LL x : choices) dbg(x);
	sort(choices.begin(), choices.end());
	ans = 1e18;
	dfs(0, 1, 1);
	printf("%lld %lld\n", ax, ay);
	return 0;
}